#ifndef CPCAPIPV6PACKET_H
#define CPCAPIPV6PACKET_H

#include "pcappacket.h"

class CPCapIpv6Packet : public CPCapPacket
{
    Q_OBJECT
    Q_PROPERTY(QString nextHeader READ nextHeader WRITE setNextHeader NOTIFY nextHeaderChanged)
    Q_PROPERTY(QString hopLimit READ hopLimit WRITE setHopLimit NOTIFY hopLimitChanged)
    Q_PROPERTY(QString sourceIp READ sourceIp WRITE setSourceIp NOTIFY sourceIpChanged)
    Q_PROPERTY(QString destIp READ destIp WRITE setDestIp NOTIFY destIpChanged)
public:
    explicit CPCapIpv6Packet(QObject *parent = Q_NULLPTR);
    ~CPCapIpv6Packet();

    QString nextHeader() const;
    void setNextHeader(const QString &nextHeader);

    QString hopLimit() const;
    void setHopLimit(const QString &hopLimit);

    QString sourceIp() const;
    void setSourceIp(const QString &sourceIp);

    QString destIp() const;
    void setDestIp(const QString &destIp);

    int headerLength() Q_DECL_OVERRIDE;
    bool buildHeader(QByteArray &header) Q_DECL_OVERRIDE;

Q_SIGNALS:
    void nextHeaderChanged();
    void hopLimitChanged();
    void sourceIpChanged();
    void destIpChanged();

private:
    QString m_nextHeader;
    QString m_hopLimit;
    QString m_sourceIp;
    QString m_destIp;
};

#endif // CPCAPIPV6PACKET_H
